﻿Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports TorneosBackEnd
Imports Microsoft.VisualBasic
'Imports Persistencia


<TestClass()> _
Public Class CategoriaNegocioTest

    <TestMethod()> _
    Public Sub insertarEmpleadoTest()
        Dim negocio As New EmpleadoNegocio()

        Try
            Dim modelo = negocio.insertar("chicho", "abdel", "53468252", "rimac", "3002587", "M", "18/11/1970")

            Console.Write(modelo.idEmpleado)

            'Assert.AreEqual(1, modelo.idEmpleado)

        Catch ex As DAOExcepcion
            Assert.Fail(ex.ToString())
        End Try

    End Sub

    '<TestMethod()> _
    Public Sub insertarVideoTest()
        Dim negocio As New VideoNegocio()

        Try
            Dim modelo = negocio.insertar(1, "c", "12/10/2011")

            Console.Write(modelo.idVideo)

            'Assert.AreEqual(1, modelo.idEmpleado)

        Catch ex As DAOExcepcion
            Assert.Fail(ex.ToString())
        End Try

    End Sub
    '<TestMethod()> _
    Public Sub actualizarTest()
        Dim negocio As New EmpleadoNegocio()

        Try
            negocio.actualizar(53468252, "lima", 5555555, "19/12/2001")
            negocio.obtener(53468252)

            MsgBox("Actualizado correctamente")

        Catch ex As Exception
            Assert.Fail(ex.ToString())
        End Try

    End Sub
End Class




